<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta charset="gb2312">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=dege" />
    <meta name="format-detection" content="telephone=no" />
    <title>阳光大姐家政培训平台</title>
    <link rel="stylesheet" href="css/bootstrap.min.css" />
    <link rel="stylesheet" href="css/swiper.min.css" />
    <link rel="stylesheet" href="css/animate.min.css" />
    <link href="images/favicon.ico" rel="icon" type="images/x-icon">
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/headfoot.css" />
    <link rel="stylesheet" href="css/dyf.css">
    <script src="js/jquery-1.11.3.min.js"></script>
    <script src="js/swiper.jquery.min.js"></script>
    <script src="js/index.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/wow.min.js"></script>
    <script type="text/javascript"
        src="http://api.map.baidu.com/api?v=2.0&ak=2Sbt5slrZOkMZXcQtUZRy30A2WNAdgBG"></script>
    <!--[if lt IE 9]>
    <script src="js/html5shiv.min.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->
    <script>
        if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))) {
            new WOW().init();
        }
    </script>
</head>

<body>
    <!--头部部分-->
    <div class="heads">
        <script>
            $(".heads").load("head.html");
        </script>
    </div>
    <div class="sebg lianbg">

    </div>
    <div class="huibg">
        <div class="main-md">
            <div class="main-tit">
                <h2>当前位置：<a href="?">首页</a>&nbsp;&nbsp;&gt;&nbsp;&nbsp;<a>培训课程</a></h2>
            </div>
        </div>
        <div class="main-md">
            <div class="baibg pad">
                <div class="lian_tit">
                    <h4>阳光大姐家政教育平台</h4>
                    <p>Home economics training platform for sister sunshine</p>
                </div>
                <div class="lian_cont">
                    <p>办公地址：济南市市中区马鞍山路62号</p>
                    <p>客服电话：0531-82902718</p>
                    <p>邮 &nbsp; &nbsp; 箱：<em>ygdjbgs@163.com</em> </p>
                </div>
                <div style="font-size:12px" id="map"></div>
            </div>
        </div>

    </div>
    <!--页尾-->
    <div class="foots">
        <script>
            $(".foots").load("foot.html");
        </script>
    </div>
    <script type="text/javascript">
        //创建和初始化地图函数：
        function initMap() {
            createMap();//创建地图
            setMapEvent();//设置地图事件
            addMapControl();//向地图添加控件
            addMapOverlay();//向地图添加覆盖物
        }
        function createMap() {
            map = new BMap.Map("map");
            map.centerAndZoom(new BMap.Point(117.007878, 36.65106), 19);
        }
        function setMapEvent() {
            map.enableScrollWheelZoom();
            map.enableKeyboard();
            map.enableDragging();
            map.enableDoubleClickZoom()
        }
        function addClickHandler(target, window) {
            target.addEventListener("click", function () {
                target.openInfoWindow(window);
            });
        }
        function addMapOverlay() {
            var markers = [
                { content: "我的备注", title: "我的标记", imageOffset: { width: -46, height: -21 }, position: { lat: 36.651208, lng: 117.007797 } }
            ];
            for (var index = 0; index < markers.length; index++) {
                var point = new BMap.Point(markers[index].position.lng, markers[index].position.lat);
                var marker = new BMap.Marker(point, {
                    icon: new BMap.Icon("http://api.map.baidu.com/lbsapi/createmap/images/icon.png", new BMap.Size(20, 25), {
                        imageOffset: new BMap.Size(markers[index].imageOffset.width, markers[index].imageOffset.height)
                    })
                });
                var label = new BMap.Label(markers[index].title, { offset: new BMap.Size(25, 5) });
                var opts = {
                    width: 200,
                    title: markers[index].title,
                    enableMessage: false
                };
                var infoWindow = new BMap.InfoWindow(markers[index].content, opts);
                // marker.setLabel(label);
                addClickHandler(marker, infoWindow);
                map.addOverlay(marker);
                marker.setAnimation(BMAP_ANIMATION_BOUNCE);
            };
        }
        //向地图添加控件
        function addMapControl() {
            var scaleControl = new BMap.ScaleControl({ anchor: BMAP_ANCHOR_BOTTOM_LEFT });
            scaleControl.setUnit(BMAP_UNIT_IMPERIAL);
            map.addControl(scaleControl);
            var navControl = new BMap.NavigationControl({ anchor: BMAP_ANCHOR_TOP_LEFT, type: BMAP_NAVIGATION_CONTROL_LARGE });
            map.addControl(navControl);
            var overviewControl = new BMap.OverviewMapControl({ anchor: BMAP_ANCHOR_BOTTOM_RIGHT, isOpen: true });
            map.addControl(overviewControl);
        }
        var map;
        initMap();
    </script>
</body>

</html>